package com.tedu.day06mybatis.mapper;

import com.tedu.day06mybatis.pojo.Weibo;
import com.tedu.day06mybatis.pojo.WeiboVO1;
import com.tedu.day06mybatis.pojo.WeiboVO3;
import com.tedu.day06mybatis.pojo.weiboVO2;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WeiboMapper {
    int insert(Weibo weibo);
    int deleteById(Integer id);
    int update(Weibo weibo);
    Weibo selectById(Integer id);
    List<Weibo> selectAll();
    @Select("SELECT content,created FROM weibo WHERE id=#{id}")
    WeiboVO1 selectContent(Integer id);

    int updateComment(Weibo weibo);

    int deleteByIds(Integer[] ids);
    int deleteByIds2(List<Integer> ids);
    int selectCount();
    weiboVO2 selectResultMap(Integer id);
    WeiboVO3 selectWeiboAndCommentById(Integer id);
}
